import Vue from 'vue'
import App from './App'
import VueI18n from 'vue-i18n'

import {} from './elcomponent'

import 'element-ui/lib/theme-chalk/index.css'
import './iconfont/iconfont.css'
import './styles/cover.scss'
import './styles/index.scss'

import MakingForm from './components/Container.vue'

import enUS from './lang/en-US'
import zhCN from './lang/zh-CN'

Vue.use(VueI18n);
Vue.config.productionTip = false

const messages = {
  'en_US': {
    header: {
      title: 'FormMaking',
      document: 'Docs',
      pricing: 'Pricing',
      advanced: 'Advanced',
    },
    ...enUS
  },
  'zh_CN': {
    header: {
      title: '表单设计器',
      document: '使用文档',
      pricing: '商业授权',
      advanced: '高级版本',
    },
    ...zhCN
  }
}

Vue.locale('en_US', {...messages['en_US']})
Vue.locale('zh_CN', {...messages['zh_CN']})

Vue.config.lang = 'zh_CN'

Vue.component(MakingForm.name, MakingForm)

App.mpType = 'app'

const app = new Vue({
  ...App
})
app.$mount()
